{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "3.写一个程序，能问用户名字（分姓与名）,分别输入姓与名，然后程序会将姓名颠倒后,再跟你打印出来。\n",
    "\n",
    "\n",
    "*Python2.X版本：raw_input() 跟你返回一个str\n",
    "*Python3.X版本：input()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "请输入你的姓:小\n",
      "请输入你的名字：明\n",
      "Hi明小\n"
     ]
    }
   ],
   "source": [
    "last_name=input(\"请输入你的姓:\")\n",
    "first_name=input(\"请输入你的名字：\")\n",
    "print(\"Hi\" + first_name + last_name )"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "请输入你的姓:William\n",
      "请输入你的名字：jiamin\n",
      "HijiaminWilliam\n"
     ]
    }
   ],
   "source": [
    "last_name=input(\"请输入你的姓:\")\n",
    "first_name=input(\"请输入你的名字：\")\n",
    "print(\"Hi\" + first_name + last_name )"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
